<!--<body>-->
<script src="<?php echo base_url('skin/js/summary.js'); ?>"></script>
        
    <div id="orderSummary">

	<div class="galleryRight"></div>
         <div class="width960c">
            
            <div class="alignCenter" id="statusSummary">
                <!--<h1 class="header36 marg10 textBold">Your GoGADGETS prepaid bundle details</h1>-->
                <div class="width500" style="display:none">
                <p class="text20 marg0 textBold">Status: <span class="greenText"> Completed</span></p>
                <p class="text16 marg10Top">The commitment period has been completed.</p>

                <hr>                
                <p><b> Amount of savings received to date:</b> P50.00</p>
                <p><b>Total savings for the chosen commitment period:</b> P1,324.00 </p>
                <hr>

                </div>             
                
            </div>
            <div class="globelogo" style="margin-top:30px">
					<img src="<?php echo base_url('skin/images/globe.png'); ?>" width="128" height="55" alt="Globe">
			</div>
            <div class="planCode" style="display:none">
                <div class="floatLeft box1">
                    <img class="marg20Top" src="<?php echo base_url('skin/images/goGadgetsMini.png'); ?>" width="94" height="105" alt=""/>
                </div>
                
                <span class="clear"></span>
            </div>
            
            <div class="phoneSum">
                <div class="floatLeft information">
                        <p class="font24yv fontBold marg0" id="referencenumber">Reference Number: <?php if(isset($_COOKIE['tiangge_planCode'])) echo $_COOKIE['tiangge_planCode']; ?></p>
			
                        <p class="text20 marg0"><?php if(isset($_COOKIE['tiangge_model'])) echo $_COOKIE['tiangge_model']; ?></p>
                        
                        
                        <ul>
                        <li><?php if(isset($_COOKIE['tiangge_choosePromo'])) echo $_COOKIE['tiangge_choosePromo']; ?>
                           <p> With <?php 
										$user_agent = $_SERVER['HTTP_USER_AGENT']; 
										if (strpos( $user_agent, 'Safari') !== false) {
											if(isset($_COOKIE['tiangge_promoDesc'])) {
												$promoDesc = $_COOKIE['tiangge_promoDesc'];
												echo str_replace("john",",",$promoDesc);
											}
										} else {
											if(isset($_COOKIE['tiangge_promoDesc'])) {
												echo $_COOKIE['tiangge_promoDesc'];
											}
										}	
									?>.
							</p>
                           <p> Valid for <?php if(isset($_COOKIE['tiangge_validity'])) echo $_COOKIE['tiangge_validity']; ?></p>
							
							<?php if ($_COOKIE['tiangge_validity'] == "7 days"): ?>
								 <p>Must subscribe weekly throughout the registration period</p>
							<?php elseif ($_COOKIE['tiangge_validity'] == "15 days"): ?>
								 <p>Must subscribe twice a month throughout the registration period</p>
							<?php else: ?>
								 <p>Must subscribe monthly throughout the registration period</p>
							<?php endif;?>

                        </li>
                        <li>Registration period and cash back
                            <p><?php if(isset($_COOKIE['tiangge_months'])) echo $_COOKIE['tiangge_months']; ?></p>
                            <p>Total cash back of <?php if(isset($_COOKIE['tiangge_totalrebate'])) echo "P" . number_format(str_replace("P", "", $_COOKIE['tiangge_totalrebate']),2);?>&nbsp;(<?php if(isset($_COOKIE['tiangge_rebateamt'])) echo "P" . number_format(str_replace("P", "", $_COOKIE['tiangge_rebateamt']),2); ?> per registration to <?php if(isset($_COOKIE['tiangge_choosePromo'])) echo $_COOKIE['tiangge_choosePromo']; ?>)</p></li>
                        </ul>
                
                </div>
                
                <div class="floatRight priceList">
                        <div class="darkGrayBg">
                        <p>Required cash out is:</p>
                        </div>
                        <table>
                            <tr>
                                <td><?php if(isset($_COOKIE['tiangge_model'])) echo $_COOKIE['tiangge_model']; ?> </td>             
                                <td class="alignRight"><?php if(isset($_COOKIE['tiangge_price'])) echo $_COOKIE['tiangge_price']; ?></td>
                            </tr>
                            <tr>
                                <td><?php if(isset($_COOKIE['tiangge_choosePromo'])) echo $_COOKIE['tiangge_choosePromo']; ?></td>
                                <td class="alignRight"><?php if(isset($_COOKIE['tiangge_promoprice'])) echo $_COOKIE['tiangge_promoprice']; ?></td>
                           
                            </tr>
                             <tr class="fontBold text20">
                            <td><p>Total Cash Out </p> </td><td  class="alignRight"><p><?php if(isset($_COOKIE['tiangge_totalcash'])) echo  "P" . number_format(str_replace(",", "", substr($_COOKIE['tiangge_price'],1)) + str_replace(",", "", $_COOKIE['tiangge_promoprice']),2); ?></p></td>
                            </tr>
                        </table>
                        <div class="darkGrayBg">
								<?php if (strchr(number_format(str_replace(",", "", substr($_COOKIE['tiangge_price'],1)) - str_replace("P","",str_replace(",", "", $_COOKIE['tiangge_totalrebate'])),2),"-",false)): ?>
									 <p>With your cash back, the gadget price is now:</p>
								<?php else: ?>
									 <p>With your cash back, the discounted gadget price is:</p>
								<?php endif;?>
                        </div>
                        <table>
                            <tr>
                                <td><?php if(isset($_COOKIE['tiangge_model'])) echo $_COOKIE['tiangge_model']; ?> </td>             
                                <td class="alignRight"><?php if(isset($_COOKIE['tiangge_price'])) echo $_COOKIE['tiangge_price']; ?></td>
                            </tr>
                            <tr>
                                <td>Total cash back</td>
                                <td class="alignRight"><?php if(isset($_COOKIE['tiangge_totalrebate'])) echo number_format(str_replace("P", "", $_COOKIE['tiangge_totalrebate']),2); ?></td>
                           
                            </tr>
                            <tr class="fontBold text20">
								<?php if (strchr(number_format(str_replace(",", "", substr($_COOKIE['tiangge_price'],1)) - str_replace("P","",str_replace(",", "", $_COOKIE['tiangge_totalrebate'])),2),"-",false)): ?>
									 <td><p>Gadget Price<br/>(After Cash Back)</p></td><td class="alignRight"><p><span style="text-decoration:line-through"><?php if(isset($_COOKIE['tiangge_discounted'])) echo "P" . number_format(str_replace(",", "", substr($_COOKIE['tiangge_price'],1)) - str_replace("P","",str_replace(",", "", $_COOKIE['tiangge_totalrebate'])),2); ?></span><br/>FREE</p></td>
								<?php else: ?>
									 <td><p>Discounted Gadget Price</p></td><td class="alignRight"><p><?php if(isset($_COOKIE['tiangge_discounted'])) echo "P" . number_format(str_replace(",", "", substr($_COOKIE['tiangge_price'],1)) - str_replace("P","",str_replace(",", "", $_COOKIE['tiangge_totalrebate'])),2); ?></p></td>
								<?php endif;?>
                            </tr>
                        </table>
                        
                        
                        
                </div>
                 <span class="clear"></span>
            
            </div>
            
            
            <div class="phoneSum2 text14" style="background-color: white;">
                <div class="phoneSum2A floatLeft">
                    <div><p class="textBold inBlock  width215">Mobile number </p> <p class="inBlock"><span id="sum-mobtel">
					<?php if(isset($_COOKIE['tiangge_mobtel'])){ if($_COOKIE['tiangge_mobtel']=="0") echo "None"; else echo $_COOKIE['tiangge_mobtel'];} ?>
					</span></p></div>
                    <div><p class="textBold inBlock width215">Name</p>                 <p class="inBlock"><?php if(isset($_COOKIE['tiangge_sumname'])) echo $_COOKIE['tiangge_sumname']; ?> </p></div>
                    <div><p class="textBold inBlock width215">Nickname</p>             <p class="inBlock"><?php if(isset($_COOKIE['tiangge_nname'])) echo $_COOKIE['tiangge_nname']; ?></p></div>
                    <div><p class="textBold inBlock width215">Email address</p>            <p class="inBlock"><?php if(isset($_COOKIE['tiangge_eadd'])) echo $_COOKIE['tiangge_eadd']; ?></p></div>
                    <div><p class="textBold inBlock width215">Other contact number</p>   <p class="inBlock"><?php if(isset($_COOKIE['tiangge_othercont'])) echo $_COOKIE['tiangge_othercont']; ?></p></div>
                    <div><p class="textBold inBlock width215">Date of birth</p>            <p class="inBlock"><?php if(isset($_COOKIE['tiangge_bday'])){date_default_timezone_set("Asia/Manila");$date = new DateTime($_COOKIE['tiangge_bday']); echo date_format($date,'m-d-Y');} ?></p></div>
                    <div>
                    	<p class="textBold inBlock width215">Home address</p>
	                    <p class="inBlock">
							<?php 
							if($_COOKIE['tiangge_province']=="Metro Manila")
								echo $_COOKIE['tiangge_address'] . ', ' . $_COOKIE['tiangge_area'] . ', ' . $_COOKIE['tiangge_town'] . ', ' . $_COOKIE['tiangge_province'] . ', ' . $_COOKIE['tiangge_postalcode']; 
							else 
								echo $_COOKIE['tiangge_address'] . ', ' . $_COOKIE['tiangge_town'] . ', ' . $_COOKIE['tiangge_province'] . ', ' . $_COOKIE['tiangge_postalcode']; 
							?>
	                    </p>
                    </div>
  
                </div>
                
                
                <span class="clear"></span>
                
                <div id="printbutton" class="alignCenter">
                    <a href="#." id="btn_print" class="buttonBlue text14 marg10Top">Print</a>
                </div>
                
            </div>
            
         </div>   
                
    </div>     
		
	</div>
	<div class="dialog_overlay"></div> 